<template>
  <div class="ting_item" @click='goTingDetail'>
    <div class="img">
      <img v-lazy="img" alt=""  @error="foo"/>
    </div>
    <div class="info">
      <div class="title">{{title}}</div>
      <div class="btns">
          <span class="count">
            <i class="font_family icon-shengyin_o" v-if="contentType == 2"></i><i class="font_family icon-wenzhang" v-if="contentType == 1"></i>&nbsp;{{dataCount}}
          </span>
          <span class="timer">
              {{releaseAt | getDetailTime}}更新
          </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  methods: {
    foo(e) {
      let img = e.srcElement;
    //   img.src = "../../../assets/icon/common/img_load.png";
      img.onerror = null;
    },

     goTingDetail(){
      this.$router.push('/ting/detail/'+this.id)
    }
  },
  props:{
    img:{
      type:String
    },
    title:{
      type:String
    },
    dataCount:{
      type:Number
    },
    id:{
      type:Number,

    },
    intro:{
      type:String,
    },
    releaseAt:{
      type:Number
    },
    contentType:{
      type:Number
    }
  },

   
  
};
</script>

<style lang="scss" scoped>
.ting_item {
  width: 100%;
  padding: 15px 0;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  .img {
    width: 70px;
    height: 70px;
    background: url(../../../assets/icon/common/img_load.png) no-repeat;
    background-size: 100% 100%;
    > img {
      width: 100%;
      height: 100%;
    }
  }
  .info {
    width: 276px;

    height: 70px;
    padding-left: 10px;

    .title {
      height: 44px;
      color: #40404c;
      font-size: 16px;
      display: -webkit-box;
      overflow: hidden;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 22px;
    }
    .btns{
        margin-top: 9px;
        color: #a3a3ac;
        font-size: 12px;
        .count{
            margin-right:14px;
        }
    }
  }
}
</style>

